﻿
using Admin.NET.Application.Entity;

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 变量历史值基础输入参数
    /// </summary>
    public class DevicePointsValueHistoryBaseInput
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        public virtual long DeviceInfoId { get; set; }
        
        /// <summary>
        /// 变量ID
        /// </summary>
        public virtual long DeviceSlaveTemplatePointsId { get; set; }
        
        /// <summary>
        /// 变量值
        /// </summary>
        public virtual string PonitValue { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
        /// <summary>
        /// 读取类型
        /// </summary>
        public virtual ReadValueType ReadValueType { get; set; }
        
    }

    /// <summary>
    /// 变量历史值分页查询输入参数
    /// </summary>
    public class PageDevicePointsValueHistoryInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 设备ID
        /// </summary>
        public long? DeviceInfoId { get; set; }
        
        /// <summary>
        /// 读取类型
        /// </summary>
        public ReadValueType? ReadValueType { get; set; }

        public long? Id { get; set; }
        
    }

    /// <summary>
    /// 变量历史值增加输入参数
    /// </summary>
    public class AddDevicePointsValueHistoryInput : DevicePointsValueHistoryBaseInput
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        [Required(ErrorMessage = "设备ID不能为空")]
        public override long DeviceInfoId { get; set; }
        
        /// <summary>
        /// 变量ID
        /// </summary>
        [Required(ErrorMessage = "变量ID不能为空")]
        public override long DeviceSlaveTemplatePointsId { get; set; }
        
        /// <summary>
        /// 变量值
        /// </summary>
        [Required(ErrorMessage = "变量值不能为空")]
        public override string PonitValue { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
        /// <summary>
        /// 读取类型
        /// </summary>
        [Required(ErrorMessage = "读取类型不能为空")]
        public override ReadValueType ReadValueType { get; set; }
        
    }

    /// <summary>
    /// 变量历史值删除输入参数
    /// </summary>
    public class DeleteDevicePointsValueHistoryInput : BaseIdInput
    {
    }

    /// <summary>
    /// 变量历史值更新输入参数
    /// </summary>
    public class UpdateDevicePointsValueHistoryInput : DevicePointsValueHistoryBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 变量历史值主键查询输入参数
    /// </summary>
    public class QueryByIdDevicePointsValueHistoryInput : DeleteDevicePointsValueHistoryInput
    {

    }
